//: Playground - noun: a place where people can play

import UIKit

var str = "Hello, playground"

let ID:Bool = true
let Money:Bool = true
let Ontime = false


//if ID{
//    if Money{
//        if Ontime{
//            print("可以买票回南阳")
//        }else{
//            print("不可以回南阳")
//        }
//    }else{
//        print("不可以回南阳")
//    }
//}else{
//    print("不可以回南阳")
//}


func goBack(id id:Bool,money:Bool,time:Bool) -> Bool {
    guard id else{
        print( "NO")
        return false
    }
    guard money else{
        print( "NO")
        return false
    }
    guard time else{
        print( "NO")
        return false
    }
    print("OK")
    return true
}
goBack(id:ID, money: Money, time: Ontime)


